package com.guoliang.eduService.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.guoliang.eduService.entity.EduCourse;
import com.baomidou.mybatisplus.extension.service.IService;
import com.guoliang.eduService.entity.vo.CourseFrontVo;
import com.guoliang.eduService.entity.vo.CourseInfoVo;
import com.guoliang.eduService.entity.vo.CoursePublishVo;
import com.guoliang.eduService.entity.vo.CourseQuery;

import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author leo
 * @since 2023-01-18
 */
public interface EduCourseService extends IService<EduCourse> {

    String saveCourseInfo(CourseInfoVo courseInfoVo);

    CourseInfoVo getByCourseInfoVoById(String id);

    void updateCourseInfo(CourseInfoVo courseInfo);

    CoursePublishVo getCoursePublish(String id);

    Page<EduCourse> pageCourseCondition(CourseQuery courseQuery, Integer page, Integer limit);

    void removeCourse(String id);

    Map<String, Object> getFrontCourseList(Page<EduCourse> coursePage, CourseQuery courseQuery);

    CourseFrontVo getFrontCourseInfo(String id);

    void updateBuyCount(String id);

    void updateViewCount(String id, Long viewCount);
}
